* Constructor
*/
function wfSpecialRecentchanges( $par ) {
- global $wgUser, $wgOut, $wgLang, $wgTitle, $wgMemc, $wgDBname;
- global $wgRequest, $wgSitename, $wgLanguageCode;
+ global $wgUser, $wgOut, $wgLang, $wgContLang, $wgTitle, $wgMemc, $wgDBname;
+ global $wgRequest, $wgSitename, $wgLanguageCode, $wgContLanguageCode;
global $wgFeedClasses;
$fname = 'wfSpecialRecentchanges';
'hidebots' => $hidebots, 'hidepatrolled' => $hidepatrolled);
$hideparams = wfArrayToCGI( $urlparams );
- $minorLink = $sk->makeKnownLink( $wgLang->specialPage( 'Recentchanges' ),
+ $minorLink = $sk->makeKnownLink( $wgContLang->specialPage( 'Recentchanges' ),
$showhide[1-$hideminor], wfArrayToCGI( array( 'hideminor' => 1-$hideminor ), $urlparams ) );
- $botLink = $sk->makeKnownLink( $wgLang->specialPage( 'Recentchanges' ),
+ $botLink = $sk->makeKnownLink( $wgContLang->specialPage( 'Recentchanges' ),
$showhide[1-$hidebots], wfArrayToCGI( array( 'hidebots' => 1-$hidebots ), $urlparams ) );
- $liuLink = $sk->makeKnownLink( $wgLang->specialPage( 'Recentchanges' ),
+ $liuLink = $sk->makeKnownLink( $wgContLang->specialPage( 'Recentchanges' ),
$showhide[1-$hideliu], wfArrayToCGI( array( 'hideliu' => 1-$hideliu ), $urlparams ) );
- $patrLink = $sk->makeKnownLink( $wgLang->specialPage( 'Recentchanges' ),
+ $patrLink = $sk->makeKnownLink( $wgContLang->specialPage( 'Recentchanges' ),
$showhide[1-$hidepatrolled], wfArrayToCGI( array( 'hidepatrolled' => 1-$hidepatrolled ), $urlparams ) );
$uid = $wgUser->getID();
$note = rcDayLimitLinks( $days, $limit, 'Recentchanges', $hideparams, false, $minorLink, $botLink, $liuLink, $patrLink );
$note .= "<br />\n" . wfMsg( 'rclistfrom',
- $sk->makeKnownLink( $wgLang->specialPage( 'Recentchanges' ),
+ $sk->makeKnownLink( $wgContLang->specialPage( 'Recentchanges' ),
$wgLang->timeanddate( $now, true ), $hideparams.'&from='.$now ) );
$wgOut->addHTML( $note."\n" );
if( isset($wgFeedClasses[$feedFormat]) ) {
$feed = new $wgFeedClasses[$feedFormat](
- $wgSitename . ' - ' . wfMsg( 'recentchanges' ) . ' [' . $wgLanguageCode . ']',
+ $wgSitename . ' - ' . wfMsg( 'recentchanges' ) . ' [' . $wgContLanguageCode . ']',
htmlspecialchars( wfMsg( 'recentchangestext' ) ),
$wgTitle->getFullUrl() );
$feed->outHeader();
*
*/
function rcCountLink( $lim, $d, $page='Recentchanges', $more='' ) {
- global $wgUser, $wgLang;
+ global $wgUser, $wgLang, $wgContLang;
$sk = $wgUser->getSkin();
- $s = $sk->makeKnownLink( $wgLang->specialPage( $page ),
+ $s = $sk->makeKnownLink( $wgContLang->specialPage( $page ),
($lim ? $wgLang->formatNum( "{$lim}" ) : wfMsg( 'all' ) ), "{$more}" .
($d ? "days={$d}&" : '') . 'limit='.$lim );
return $s;
*
*/
function rcDaysLink( $lim, $d, $page='Recentchanges', $more='' ) {
- global $wgUser, $wgLang;
+ global $wgUser, $wgLang, $wgContLang;
$sk = $wgUser->getSkin();
- $s = $sk->makeKnownLink( $wgLang->specialPage( $page ),
+ $s = $sk->makeKnownLink( $wgContLang->specialPage( $page ),
($d ? $wgLang->formatNum( "{$d}" ) : wfMsg( "all" ) ), $more.'days='.$d .
($lim ? '&limit='.$lim : '') );
return $s;
* @param string $par parent page we will look at
*/
function wfSpecialRecentchangeslinked( $par = NULL ) {
- global $wgUser, $wgOut, $wgLang, $wgTitle, $wgRequest;
+ global $wgUser, $wgOut, $wgLang, $wgContLang, $wgTitle, $wgRequest;
$fname = 'wfSpecialRecentchangeslinked';
$days = $wgRequest->getInt( 'days' );
$hideminor = ($hideminor ? 1 : 0);
if ( $hideminor ) {
- $mlink = $sk->makeKnownLink( $wgLang->specialPage( 'Recentchangeslinked' ),
+ $mlink = $sk->makeKnownLink( $wgContLang->specialPage( 'Recentchangeslinked' ),
WfMsg( 'show' ), 'target=' . htmlspecialchars( $nt->getPrefixedURL() ) .
"&days={$days}&limit={$limit}&hideminor=0" );
} else {
- $mlink = $sk->makeKnownLink( $wgLang->specialPage( "Recentchangeslinked" ),
+ $mlink = $sk->makeKnownLink( $wgContLang->specialPage( "Recentchangeslinked" ),
WfMsg( "hide" ), "target=" . htmlspecialchars( $nt->getPrefixedURL() ) .
"&days={$days}&limit={$limit}&hideminor=1" );
}
}
/* private */ function showList() {
- global $wgLang, $wgUser, $wgOut;
+ global $wgLang, $wgContLang, $wgUser, $wgOut;
$fname = "UndeleteForm::showList";
# List undeletable articles
$wgOut->addHTML( "<ul>\n" );
while( $row = $result->fetchObject() ) {
$n = ($row->ar_namespace ?
- ($wgLang->getNsText( $row->ar_namespace ) . ":") : "").
+ ($wgContLang->getNsText( $row->ar_namespace ) . ":") : "").
$row->ar_title;
$link = $sk->makeKnownLinkObj( $undelete,
htmlspecialchars( $n ), "target=" . urlencode( $n ) );
}
function formatResult( $skin, $result ) {
- global $wgLang;
+ global $wgLang, $wgContLang;
$title = Title::makeTitle( NS_IMAGE, $result->title );
- $ins = $wgLang->getNsText(NS_IMAGE);
+ $ins = $wgContLang->getNsText(NS_IMAGE);
$return =
# The 'desc' linking to the image page
# Last modified date
. ' . . '.$wgLang->timeanddate($result->value)
# Link to username
- . ' . . '.$skin->makeLink($wgLang->getNsText(NS_USER).':'.$result->img_user_text,$result->img_user_text);
+ . ' . . '.$skin->makeLink($wgContLang->getNsText(NS_USER).':'.$result->img_user_text,$result->img_user_text);
# If there is a description, show it
if($result->img_description != '') {
* @access private
*/
function processUpload() {
- global $wgUser, $wgOut, $wgLang;
+ global $wgUser, $wgOut, $wgLang, $wgContLang;
global $wgUploadDirectory;
global $wgSavedFile, $wgUploadOldVersion;
global $wgUseCopyrightUpload, $wgCheckCopyrightUpload;
}
if( $nt->getArticleID() ) {
$sk = $wgUser->getSkin();
- $dname = $wgLang->getNsText( Namespace::getImage() ) .':'.$this->mUploadSaveName;
+ $dname = $wgContLang->getNsText( Namespace::getImage() ) .':'.$this->mUploadSaveName;
$dlink = $sk->makeKnownLink( $dname, $dname );
$warning .= '<li>'.wfMsg( 'fileexists', $dlink ).'</li>';
}
$sk = $wgUser->getSkin();
$ilink = $sk->makeMediaLink( $this->mUploadSaveName, Image::wfImageUrl( $this->mUploadSaveName ) );
- $dname = $wgLang->getNsText( Namespace::getImage() ) . ':'.$this->mUploadSaveName;
+ $dname = $wgContLang->getNsText( Namespace::getImage() ) . ':'.$this->mUploadSaveName;
$dlink = $sk->makeKnownLink( $dname, $dname );
$wgOut->addHTML( '<h2>' . wfMsg( 'successfulupload' ) . "</h2>\n" );
}
function formatResult( $skin, $result ) {
- global $wgLang;
+ global $wgContLang;
$nt = Title::newFromDBkey( $result->title );
if( is_null( $nt ) ) {
}
$plink = $skin->makeBrokenLink( $nt->getPrefixedText(), "" );
$nl = wfMsg( "nlinks", $result->value );
- $nlink = $skin->makeKnownLink( $wgLang->specialPage( "Whatlinkshere" ), $nl,
+ $nlink = $skin->makeKnownLink( $wgContLang->specialPage( "Whatlinkshere" ), $nl,
"target=" . $nt->getPrefixedURL() );
return "{$plink} ({$nlink})";
function wlHoursLink( $h, $page ) {
- global $wgUser, $wgLang;
+ global $wgUser, $wgLang, $wgContLang;
$sk = $wgUser->getSkin();
$s = $sk->makeKnownLink(
- $wgLang->specialPage( $page ),
+ $wgContLang->specialPage( $page ),
$wgLang->formatNum( $h ),
"days=" . ($h / 24.0) );
return $s;
function wlDaysLink( $d, $page ) {
- global $wgUser, $wgLang;
+ global $wgUser, $wgLang, $wgContLang;
$sk = $wgUser->getSkin();
$s = $sk->makeKnownLink(
- $wgLang->specialPage( $page ),
+ $wgContLang->specialPage( $page ),
($d ? $wgLang->formatNum( $d ) : wfMsg( "all" ) ), "days=$d" );
return $s;
}
# Returns a stripped-down a title string ready for the search index
# Takes a namespace index and a text-form main part
/* static */ function indexTitle( $ns, $title ) {
- global $wgDBminWordLen, $wgLang;
+ global $wgDBminWordLen, $wgContLang;
require_once( 'SearchEngine.php' );
$lc = SearchEngine::legalSearchChars() . '&#;';
- $t = $wgLang->stripForSearch( $title );
+ $t = $wgContLang->stripForSearch( $title );
$t = preg_replace( "/[^{$lc}]+/", ' ', $t );
$t = strtolower( $t );
# Make a prefixed DB key from a DB key and a namespace index
/* static */ function makeName( $ns, $title ) {
- global $wgLang;
+ global $wgContLang;
- $n = $wgLang->getNsText( $ns );
+ $n = $wgContLang->getNsText( $ns );
if ( '' == $n ) { return $title; }
else { return $n.':'.$title; }
}
# Get a real URL referring to this title, with interwiki link and fragment
function getFullURL( $query = '' ) {
- global $wgLang, $wgArticlePath, $wgServer, $wgScript;
+ global $wgContLang, $wgArticlePath, $wgServer, $wgScript;
if ( '' == $this->mInterwiki ) {
$p = $wgArticlePath;
return $wgServer . $this->getLocalUrl( $query );
} else {
$baseUrl = $this->getInterwikiLink( $this->mInterwiki );
- $namespace = $wgLang->getNsText( $this->mNamespace );
+ $namespace = $wgContLang->getNsText( $this->mNamespace );
if ( '' != $namespace ) {
# Can this actually happen? Interwikis shouldn't be parsed.
$namepace .= ':';
# Prefixes some arbitrary text with the namespace or interwiki prefix of this object
/* private */ function prefix( $name ) {
- global $wgLang;
+ global $wgContLang;
$p = '';
if ( '' != $this->mInterwiki ) {
$p = $this->mInterwiki . ':';
}
if ( 0 != $this->mNamespace ) {
- $p .= $wgLang->getNsText( $this->mNamespace ) . ':';
+ $p .= $wgContLang->getNsText( $this->mNamespace ) . ':';
}
return $p . $name;
}
#
/* private */ function secureAndSplit()
{
- global $wgLang, $wgLocalInterwiki, $wgCapitalLinks;
+ global $wgContLang, $wgLocalInterwiki, $wgCapitalLinks;
$fname = 'Title::secureAndSplit';
wfProfileIn( $fname );
# Initialisation
if ( $imgpre === false ) {
- $imgpre = ':' . $wgLang->getNsText( Namespace::getImage() ) . ':';
+ $imgpre = ':' . $wgContLang->getNsText( Namespace::getImage() ) . ':';
# % is needed as well
$rxTc = '/[^' . Title::legalChars() . ']/';
}
# Canonical namespace
$t = $m[2];
$this->mNamespace = $ns;
- } elseif ( $ns = $wgLang->getNsIndex( $lowerNs )) {
+ } elseif ( $ns = $wgContLang->getNsIndex( $lowerNs )) {
# Ordinary namespace
$t = $m[2];
$this->mNamespace = $ns;
# Initial capital letter
if( $wgCapitalLinks && $this->mInterwiki == '') {
- $t = $wgLang->ucfirst( $r );
+ $t = $wgContLang->ucfirst( $r );
} else {
$t = $r;
}
# Return an array of parents in the form:
# $parent => $currentarticle
function getParentCategories() {
- global $wgLang,$wgUser;
+ global $wgContLang,$wgUser;
$titlekey = $this->getArticleId();
$sk =& $wgUser->getSkin();
if($dbr->numRows($res) > 0) {
while ( $x = $dbr->fetchObject ( $res ) )
- //$data[] = Title::newFromText($wgLang->getNSText ( NS_CATEGORY ).':'.$x->cl_to);
- $data[$wgLang->getNSText ( NS_CATEGORY ).':'.$x->cl_to] = $this->getFullText();
+ //$data[] = Title::newFromText($wgContLang->getNSText ( NS_CATEGORY ).':'.$x->cl_to);
+ $data[$wgContLang->getNSText ( NS_CATEGORY ).':'.$x->cl_to] = $this->getFullText();
$dbr->freeResult ( $res ) ;
} else {
$data = '';
* @access private
*/
function Tokenizer() {
- global $wgLang;
+ global $wgContLang;
$this->mPos=0;
$this->mTokenQueue=array();
- $this->linkPrefixExtension = $wgLang->linkPrefixExtension();
+ $this->linkPrefixExtension = $wgContLang->linkPrefixExtension();
}
/**
*/
function getGPCVal( &$arr, $name, $default ) {
if( isset( $arr[$name] ) ) {
- global $wgUseLatin1, $wgServer, $wgLang;
+ global $wgUseLatin1, $wgServer, $wgContLang;
$data = $arr[$name];
if( isset( $_GET[$name] ) &&
( empty( $_SERVER['HTTP_REFERER'] ) ||
strncmp($wgServer, $_SERVER['HTTP_REFERER'], strlen( $wgServer ) ) ) ) {
# For links that came from outside, check for alternate/legacy
# character encoding.
- $data = $wgLang->checkTitleEncoding( $data );
+ $data = $wgContLang->checkTitleEncoding( $data );
}
if( !$wgUseLatin1 ) {
require_once( 'normal/UtfNormal.php' );
function getGPCText( &$arr, $name, $default ) {
# Text fields may be in an alternate encoding which we should check.
# Also, strip CRLF line endings down to LF to achieve consistency.
- global $wgLang;
+ global $wgContLang;
if( isset( $arr[$name] ) ) {
- return str_replace( "\r\n", "\n", $wgLang->recodeInput( $arr[$name] ) );
+ return str_replace( "\r\n", "\n", $wgContLang->recodeInput( $arr[$name] ) );
} else {
return $default;
}